import base from '@/api/baseurl';
import request from '@/utils/request'



// /TCCurveSuperposition/addTCCurveSuperpositionzi  增加期限点
// 增加期限点
export function addTCCurveSuperpositionzi(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/addTCCurveSuperpositionzi',
    method: 'post',
    data
  })
}


// /TCCurveSuperposition/updateTCCurveSuperpositionzi 修改字表
// 修改期限点
export function updateTCCurveSuperpositionzi(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/updateTCCurveSuperpositionzi',
    method: 'post',
    data
  })
}


// 删除期限点
export function deleteTCCurveSuperpositionzi(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/deleteTCCurveSuperpositionzi',
    method: 'get',
    params: query
  })
}





// 查询类型状态Options
export function tCCurveSuperpositionFindsppstType(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findsppst_type',
    method: 'get',
    params: query
  })
}

// 查询曲线Options
export function tCCurveSuperpositionFingcurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/fingcurve',
    method: 'get',
    params: query
  })
}

// 查询期限点 Options
export function tCCurveSuperpositionFindtermCode(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findterm_code',
    method: 'get',
    params: query
  })
}


// 查询 期限字符串列表   参数 m_id
export function tCCurveSuperpositionFindTCCurveSuperpositionzi(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findTCCurveSuperpositionzi',
    method: 'get',
    params: query
  })
}
/**
 * 查询曲线叠加方案
 * @param {*} query 
 * @returns 
 */
export function findTCCurveSuperposition(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findTCCurveSuperposition',
    method: 'get',
    params: query
  })
}
/**
 * 查询基础曲线下拉框
 * @param {*} query 
 * @returns 
 */
export function fetchListbsall(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findbsall',
    method: 'get',
    params: query
  })
}
/**
 * 查询转移曲线下拉框
 * @param {*} query 
 * @returns 
 */
export function fetchListtsall(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findtsall',
    method: 'get',
    params: query
  })
}
/**
 * 查询市场曲线下拉框
 * @param {*} query 
 * @returns 
 */
export function fetchListMKcurve(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/BCvDirectRef/fetchListMKcurve',
    method: 'get',
    params: query
  })
}

/**
 * 单行删除
 * @param {*} query 
 * @returns 
 */
export function deleteTCCurveSuperposition(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/deleteTCCurveSuperposition',
    method: 'get',
    params: query
  })
}

/**
 * 添加方案
 * @param {*} data 
 * @returns 
 */
export function addTCCurveSuperposition(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/addTCCurveSuperposition',
    method: 'post',
    data
  })
}
/**
 * 修改方案
 * @param {*} data 
 * @returns 
 */
export function updateTCCurveSuperposition(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/updateTCCurveSuperposition',
    method: 'post',
    data
  })
}
/**
 * 多选删除
 * @param {*} data 
 * @returns 
 */
export function deleteTCCurveSuperpositionBatch(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/deleteTCCurveSuperpositionBatch',
    method: 'post',
    data
  })
}

// 查询所述法人，根据曲线code
export function tcDirectReferenceFindlpname(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCDirectReference/findlpname',
    method: 'get',
    params: query
  })
}
//同步
export function syncTCCurveSuperposition(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/syncTCCurveSuperposition',
    method: 'get',
    params: query
  })
}

//曲线待 下拉框
export function findstay_type(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findstay_curve_name',
    method: 'get',
    params: query
  })
}
//曲线叠 下拉框
export function findsppst_type(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findsppst_curve_name',
    method: 'get',
    params: query
  })
}
//曲线合 下拉框
export function findmerge_type(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/TCCurveSuperposition/findmerge_curve_name',
    method: 'get',
    params: query
  })
}



